package com.zt.common.pojo.common;

import com.zt.common.utils.JwtUtil;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * description:
 * author:zt
 * date:2021-12-03
 */
public class JwtToken implements AuthenticationToken {

    private String token;
    private String id;

    public JwtToken(String token){
        this.token = token;
        this.id = JwtUtil.decodedGetID(token);
    }

    @Override
    public Object getPrincipal() {
        return id;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
